<template>
  <div class="not-found-container">
    <div class="not-found-content">
      <el-icon class="not-found-icon"><Warning /></el-icon>
      <h1 class="not-found-title">404</h1>
      <p class="not-found-description">抱歉，您访问的页面不存在</p>
      <el-button type="primary" @click="goHome">返回首页</el-button>
    </div>
  </div>
</template>

<script>
import { Warning } from '@element-plus/icons-vue'
import { useRouter } from 'vue-router'

export default {
  name: 'NotFound',
  components: {
    Warning
  },
  setup() {
    const router = useRouter()
    
    const goHome = () => {
      router.push('/')
    }
    
    return {
      goHome
    }
  }
}
</script>

<style scoped>
.not-found-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background-color: #f0f2f5;
}

.not-found-content {
  text-align: center;
  padding: 40px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

.not-found-icon {
  font-size: 60px;
  color: #e6a23c;
  margin-bottom: 20px;
}

.not-found-title {
  font-size: 72px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #333;
}

.not-found-description {
  font-size: 20px;
  color: #666;
  margin-bottom: 30px;
}
</style>